<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg">
  <head>
    <title>Object, Classes and Modules</title>
    <link rel="stylesheet" type="text/css" href="docbook-epub.css"/>
    <link rel="stylesheet" type="text/css" href="kawa.css"/>
    <script src="kawa-ebook.js" type="text/javascript"/>
    <meta name="generator" content="DocBook XSL-NS Stylesheets V1.79.1"/>
    <link rel="prev" href="Overall-Index.xhtml" title="Index"/>
    <link rel="next" href="Defining-new-classes.xhtml" title="Defining new classes"/>
  </head>
  <body>
    <header/>
    <section class="chapter" title="Object, Classes and Modules" epub:type="chapter" id="Objects-Classes-and-Modules">
      <div class="titlepage">
        <div>
          <div>
            <h2 class="title">Object, Classes and Modules</h2>
          </div>
        </div>
      </div>
      <p>Kawa provides various ways to define, create, and access Java objects.
Here are the currently supported features.
</p>
      <p>The Kawa module system is based on the features of the Java class system.
</p>
      <p class="synopsis" kind="Syntax"><span class="kind">Syntax</span><span class="ignore">: </span><a id="idm139667871890720" class="indexterm"/> <code class="function">this</code></p>
      <div class="blockquote">
        <blockquote class="blockquote">
          <p>Returns the "this object" - the current instance of the current class.
The current implementation is incomplete, not robust, and not
well defined.  However, it will have to do for now.
Note:  "<code class="literal">this</code>" is a macro, not a variable, so you have to write
it using parentheses: ‘<code class="literal">(this)</code>’.  A planned extension will
allow an optional class specifier (needed for nested clases).
</p>
        </blockquote>
      </div>
    </section>
    <footer>
      <div class="navfooter">
        <ul>
          <li>
            <b class="toc">
              <a href="Defining-new-classes.xhtml">Defining new classes</a>
            </b>
          </li>
          <li>
            <b class="toc">
              <a href="Anonymous-classes.xhtml">Anonymous classes</a>
            </b>
          </li>
          <li>
            <b class="toc">
              <a href="Enumerations.xhtml">Enumeration types</a>
            </b>
          </li>
          <li>
            <b class="toc">
              <a href="Annotations.xhtml">Annotations of declarations</a>
            </b>
          </li>
          <li>
            <b class="toc">
              <a href="Module-classes.xhtml">Modules and how they are compiled to classes</a>
            </b>
          </li>
          <li>
            <b class="toc">
              <a href="Importing.xhtml">Importing from a library</a>
            </b>
          </li>
          <li>
            <b class="toc">
              <a href="Record-types.xhtml">Record types</a>
            </b>
          </li>
          <li>
            <b class="toc">
              <a href="Dynamic-records.xhtml">Creating New Record Types On-the-fly</a>
            </b>
          </li>
          <li>
            <b class="toc">
              <a href="Method-operations.xhtml">Calling Java methods from Scheme</a>
            </b>
          </li>
          <li>
            <b class="toc">
              <a href="Allocating-objects.xhtml">Allocating objects</a>
            </b>
          </li>
          <li>
            <b class="toc">
              <a href="Field-operations.xhtml">Accessing object fields</a>
            </b>
          </li>
          <li>
            <b class="toc">
              <a href="Mangling.xhtml">Mapping Scheme names to Java names</a>
            </b>
          </li>
          <li>
            <b class="toc">
              <a href="Scheme-types-in-Java.xhtml">Scheme types in Java</a>
            </b>
          </li>
          <li>
            <b class="toc">
              <a href="Array-operations.xhtml">Using Java Arrays</a>
            </b>
          </li>
          <li>
            <b class="toc">
              <a href="Loading-Java-functions-into-Scheme.xhtml">Loading Java functions into Scheme</a>
            </b>
          </li>
          <li>
            <b class="toc">
              <a href="Evaluating-Scheme-expressions-from-Java.xhtml">Evaluating Scheme expressions from Java</a>
            </b>
          </li>
        </ul>
        <p>
          Up: <a accesskey="u" href="pt01.xhtml">Part . Reference Documentation</a></p>
        <p>
        Previous: <a accesskey="p" href="Types.xhtml">Types</a></p>
        <p>
        Next: <a accesskey="n" href="XML-tools.xhtml">Working with XML and HTML</a></p>
      </div>
    </footer>
  </body>
</html>
